import time
from multiprocessing import Pool


def fun1(name):
    print(f'我是{name}开始')
    time.sleep(3)
    print(f'我是{name}结束')


if __name__ == '__main__':
    p = Pool()  # 实例化进程池
    t_list = list(range(1, 11))
    p.map(fun1, t_list)  # 把任务和参数添加到进程池
    print('over')
